// 引入工具类
import request from '@/utils/request.js' 
 
const addCar = {
	getAddCar: data => {// 获取token
		return request({
			url: '/wx/myCar/addItem',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	getMyList: data => {// 获取token
		return request({
			url: '/wx/myCar/list',
			method: 'GET',
			data: data,
			isLoading: true ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	getDeleteCar: data => {// 获取token
		return request({
			url: '/wx/myCar/delete',
			method: 'GET',
			data: data,
			isLoading: true ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	getCity: data => {// 获取省市
		return request({
			url: '/wx/prov/citypickerJson',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: false 
		})
	},
	getYjSellCar: data => {// 一键卖车
		return request({
			url: '/wx/usedCar/akeySellingCars',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true,
			isLogin: true 
		})
	},
	getMyselfSell: data => {// 自己卖车
		return request({
			url: '/wx/usedCar/addItem',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	editSellCar: data => {// 编辑二手车
			return request({
				url: '/wx/my/editSellCar',
				method: 'GET',
				data: data,
				contentType:'application/x-www-form-urlencoded',
				isLoading: true ,
				isLogin: true 
			})
		},
	getPrivacyPolicy: data => {//隐私条款
		return request({
			url:'/wx/privacyPolicy',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: false 
		})
	},
	getVin: data => {//vin验证
		return request({
			url:'/wx/usedCar/carInfoByVin',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
		getSellCarList: data => { //卖车记录
			return request({
				url: '/wx/my/mySellCars',
				method: 'GET',
				data: data,
				isLoading: true,
				isLogin: true
			})
		},
		cancelSellCar: data => { //取消卖车记录
			return request({
				url: '/wx/my/mySellCarsCancel',
				method: 'GET',
				data: data,
				isLoading: true,
				isLogin: true
			})
		}
}

export default addCar

